/*
 * ﻿Copyright (C) 2013-2014 NewMain Softech
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package com.newmainsoftech.eatestutil.ejbtestutil;

import java.util.List;

import javax.persistence.EntityGraph;
import javax.persistence.Query;
import javax.persistence.StoredProcedureQuery;
import javax.persistence.criteria.CriteriaDelete;
import javax.persistence.criteria.CriteriaUpdate;

/**
 * Appendage to <code>{@link AbstractEntityManagerFacadeImpl}</code> to be compatible with 
 * JDK7 <code>EntityManager</code> interface.<br />
 * 
 * @author Arata Y.
 */
public abstract class AbstractEntityManagerFacade7Impl extends AbstractEntityManagerFacadeImpl {
	@SuppressWarnings( value = { "unchecked"})
	public <T> EntityGraph<T> createEntityGraph( final Class<T> arg0) {
		return (EntityGraph<T>)invokeEntityManager( arg0);
	}
	public EntityGraph<?> createEntityGraph( final String arg0) {
		return (EntityGraph<?>)invokeEntityManager( arg0);
	}
	public StoredProcedureQuery createNamedStoredProcedureQuery(String arg0) {
		return (StoredProcedureQuery)invokeEntityManager( arg0);
	}
	public Query createQuery( @SuppressWarnings("rawtypes") final CriteriaDelete arg0) {
		return (Query)invokeEntityManager( arg0);
	}
	public Query createQuery( @SuppressWarnings("rawtypes") final CriteriaUpdate arg0) {
		return (Query)invokeEntityManager( arg0);
	}
	public StoredProcedureQuery createStoredProcedureQuery(
			final String arg0, @SuppressWarnings("rawtypes") final Class... arg1) {
		return (StoredProcedureQuery)invokeEntityManager( arg0, arg1);
	}
	public StoredProcedureQuery createStoredProcedureQuery(
			final String arg0, final String... arg1) {
		return (StoredProcedureQuery)invokeEntityManager( arg0, arg1);
	}
	public StoredProcedureQuery createStoredProcedureQuery( final String arg0) {
		return (StoredProcedureQuery)invokeEntityManager( arg0);
	}
	public EntityGraph<?> getEntityGraph( final String arg0) {
		return (EntityGraph<?>)invokeEntityManager( arg0);
	}
	@SuppressWarnings("unchecked")
	public <T> List<EntityGraph<? super T>> getEntityGraphs( final Class<T> arg0) {
		return (List<EntityGraph<? super T>>)invokeEntityManager( arg0);
	}
}
